/**
 * 处理静态资源链接
 * @param {*}  name   /src/assets/images/${name}
 * @param {*}  localhost 默认本地 true  会拼接网络地址
 * @returns
 */
export const baseStaticUrl = (name = '', localhost = false) => {
  const { VITE_APP_STATIC_URL } = import.meta.env
  if (name && localhost === false) {
    return `/src/assets/images/${name}`
  }
  if (name) {
    return `${VITE_APP_STATIC_URL}${name}`
  }
  return VITE_APP_STATIC_URL as string
}
